package com.itheima.mapper;

import com.itheima.pojo.OrderSetting;
import com.itheima.pojo.dto.OrderSettingDto;
import com.itheima.pojo.vo.OrderSettingVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderSettingMapper {
    /**
     * 根据日期查询预约设置数据
     * @param orderDate
     * @return
     */
    @Select("select * from ordersetting where order_date=#{orderDate}")
    OrderSetting getOrderSettingByDate(LocalDate orderDate);



    /**
     * 插入预约设置数据
     * @param
     */
    @Select("insert into ordersetting(order_date,number,reservations) values(#{orderDate},#{number},#{reservations})")
    void add(OrderSetting orderSettingVO);

    /**
     * 根据日期修改预约设置数据
     * @param
     * @return
     */

    void editNumberByOrderDate(OrderSettingDto orderSetting);
}
